package com.sky.mapper;


import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.annotation.Log;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.enumeration.BusinessType;
import com.sky.enumeration.OperationType;
import com.sky.vo.DishItemVO;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DishMapper {
    @AutoFill(OperationType.UPDATE)
    void updateDish(Dish dish);

    void deleteDishes(@Param("ids") List<String> ids);

    @AutoFill(OperationType.INSERT)
    void addDish(Dish dish);

    Dish getDish(String id);

    List<Dish> getDishList(@Param("categoryId") String categoryId);

    void changeStatus(@Param("status") String status, @Param("id") String id,
                      @Param("currentId") Long currentId);

    Page<DishVO> pageQuery(DishPageQueryDTO dishPageQueryDTO);


    Integer countStart(@Param("ids") List<String> ids);

    void deleteInBulk(@Param("ids") List<String> ids);

    Integer queryStatus(@Param("dishId") Long dishId);

    Integer countCategoryNumber(@Param("id") String id);

    Integer queryStatusDishes(@Param("dishId") List<Long> dishId);

    List<Dish> getDishListStstusTrue(@Param("categoryId") String categoryId);

    Integer queryStatusNum(long status);
}
